import React, { Component } from 'react'
import PropTypes from 'prop-types'

export default class TodoHeader extends Component {
    static propTypes = {
        addTodo: PropTypes.func.isRequired
    }
    render() {
        return (
            <div>
                <div className="todo-header">
                    <input onKeyUp={this.props.addTodo} type="text" placeholder="请输入你的任务名称，按回车键确认" />
                </div>
            </div>
        )
    }
}

